package com.forum.module.blog.dal.mysql.tag;

import com.forum.framework.common.pojo.PageResult;
import com.forum.framework.mybatis.core.mapper.BaseMapperX;
import com.forum.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.forum.module.blog.controller.tag.vo.TagPageReqVO;
import com.forum.module.blog.dal.dataobject.tag.TagDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface TagMapper extends BaseMapperX<TagDO> {
    default PageResult<TagDO> selectPage(TagPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TagDO>()
                .eqIfPresent(TagDO::getName, reqVO.getName()));
    }
}
